import request from '@/utils/request'

// 查询报价单列表
export function listQuote(query) {
  return request({
    url: '/quotation/quote/list',
    method: 'get',
    params: query
  })
}

// 根据业务员姓名查询报价单
export function getQuotesByName(name) {
  return request({
    url: '/quotation/quote/byName',
    method: 'get',
    params: { name }
  })
}

// 查询报价单详细信息
export function getQuote(id) {
  return request({
    url: '/quotation/quote/' + id,
    method: 'get'
  })
}

// 查询报价单和工程审核信息
export function getQuoteWithEngineering(id) {
  return request({
    url: '/quotation/quote/details/' + id,
    method: 'get'
  })
}

// 新增报价单
export function addQuote(data) {
  return request({
    url: '/quotation/quote/add',
    method: 'post',
    data: data
  })
}

// 修改报价单
export function updateQuote(data) {
  return request({
    url: '/quotation/quote/update',
    method: 'put',
    data: data
  })
}

// 删除报价单
export function delQuote(id) {
  return request({
    url: '/quotation/quote/delete/' + id,
    method: 'delete'
  })
}

// 导出报价单
export function exportQuote(query) {
  return request({
    url: '/quotation/quote/export',
    method: 'post',
    params: query
  })
}

// 生成订单编号
export function generateOrderNo() {
  return request({
    url: '/quotation/quote/generateOrderNo',
    method: 'get'
  })
} 